package com.yz.sharkim.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 暂存消息
 * </p>
 *
 * @author yangzheng
 * @since 2019-11-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_message_temp")
public class MessageTemp implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 发送至用户id
     */
    private Integer to;

    /**
     * 来源用户id
     */
    private Integer from;

    /**
     * 消息体
     */
    private String content;

    private LocalDateTime time;

    /**
     * 发送时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 消息类型:0_文本消息
     */
    private Integer type;


    public static final String ID = "id";

    public static final String TO = "to";

    public static final String FROM = "from";

    public static final String CONTENT = "content";

    public static final String CREATE_TIME = "create_time";

    public static final String TYPE = "type";

}
